package demo04.MethodReference;

public class Demo01Printable {
    //定义一个方法,参数传递Printable接口,对字符串进行打印
    public static void print(Printable p) {
        p.print("Hello,World");
    }

    public static void main(String[] args) {
        print(s-> System.out.println(s));
    }

}
